#!/usr/bin/env node
const convert = require("./convertFormat.js").convertToOldFormat;
const data = require("./jsrepository-master.json");
const fs = require("fs");

const result = convert(data, false, false);
fs.writeFileSync("jsrepository.json", JSON.stringify(result, null, 2));

const resultV2 = convert(data, true, false);
fs.writeFileSync("jsrepository-v2.json", JSON.stringify(resultV2, null, 2));

const resultV3 = convert(data, true, true, true);
fs.writeFileSync("jsrepository-v3.json", JSON.stringify(resultV3, null, 2));

const resultV4 = convert(data, true, false, true);
fs.writeFileSync("jsrepository-v4.json", JSON.stringify(resultV4, null, 2));

const resultV5 = convert(data, true, false, true, true);
fs.writeFileSync("jsrepository-v5.json", JSON.stringify(resultV5, null, 2));
